package main

import (
	"os/exec"
	"runtime"
	"database/sql"
	_ "gopkg.in/rana/ora.v4"
	"time"
)
func openBrowser(url string) bool {
	var args []string
	switch runtime.GOOS {
	case "darwin":
		args = []string{"open"}
	case "windows":
		args = []string{"cmd", "/c", "start"}
	default:
		args = []string{"xdg-open"}
	}
	cmd := exec.Command(args[0], append(args[1:], url)...)
	return cmd.Start() == nil
}
func openMysql(uri string)  {

}
func main() {
	db, err := sql.Open("ora", "user/passw@host:port/sid")
	defer db.Close()

	// Set timeout (Go 1.8)
	ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
	// Set prefetch count (Go 1.8)
	ctx = ora.WithStmtCfg(ctx, ora.Cfg().StmtCfg.SetPrefetchCount(50000))
	rows, err := db.QueryContext(ctx, "SELECT * FROM user_objects")
	defer rows.Close()
}
